import request from "@/api";


export const savePermissionsApi = (data: savePermissionsRequest): Promise<OwnAxiosResponse<null>> => {
    return request.post('/api/role/permission/save', data)
}

export const getRolePermissionByIdApi = (roleId: number | string): Promise<OwnAxiosResponse<Menu[]>> => {
    return request.get(`/api/role/permission/get/${roleId}`)
}

export const deleteRoleApi = (roleId: number | string): Promise<OwnAxiosResponse<null>> => {
    return request.delete(`/api/role/delete/${roleId}`)
}
